home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Asymetrix Multimedia Creative Suite
/
Asymetrix Multimedia Creative Suite.iso
/
compel
/
cpl2dsk.inf
< prev
next >
Wrap
INI File
|
1995-02-02
|
66KB
|
2,069 lines
;; SETUP SCRIPT TEMPLATE FILE COMPEL.INF
;; Compatible with: INSTALIT/W version 3.0 and higher
;; Shipped as script version 1.0a
;; Designed for general use with products offering three optional
;; modules and possibly requiring basic changes to AUTOEXEC.BAT
;; and/or CONFIG.SYS. Reads a Script Data File in order to adapt
;; to the job at hand.
DefineVariables
Directory [SDFFileName] := compel20.sdf
;; following variables are initialized from external Script Data File
SDF Text [CompanyName]
SDF Text [ProductName]
SDF Directory [DefaultInstallationDir]
SDF Text [ModifyMode]
SDF Directory [ReadmeFileName]
SDF Logical [InquireSysFileLocation]
SDF Logical [AskBeforeFileReplace]
SDF Logical [CDInstall]
SDF Text [MinimumOSVersion]
SDF Text [DOS401]
SDF Text [MinimumWinVersion]
SDF Number [MinMemRequiredPresent]
SDF Number [MinExtMemoryRequired]
SDF Number [WinVideoSize]
SDF Number [OLESize]
SDF Text [InstallingLanguage]
SDF Logical [AllowCGA]
SDF Logical [AllowEGA]
SDF Logical [AllowMDA]
SDF Logical [Allow808x]
SDF Logical [Allow80286]
SDF Logical [MathCoproRecommended]
SDF Logical [FixedDiskRequired]
SDF Text [NetWorkInstallation]
SDF Text [PopupBorder]
SDF Text [Module1Name]
SDF Text [Module1Groups]
SDF Text [Module2Name]
SDF Text [Module2Groups]
SDF Text [Module2aGroups]
SDF Text [Module3Name]
SDF Text [Module3Groups]
SDF Text [Module4Name]
SDF Text [Module4Groups]
SDF Text [Module5Name]
SDF Text [Module5Groups]
SDF Text [Module6Name]
SDF Text [Module6Groups]
SDF Text [Module7Name]
SDF Text [Module7Groups]
SDF Text [Module8Name]
SDF Text [Module8Groups]
SDF Text [Module9Name]
SDF Text [Module9Groups]
SDF Text [Module10Name]
SDF Text [Module10Groups]
SDF Text [MediaGroup1]
SDF Text [MediaGroup2]
SDF Text [MediaGroup3]
SDF Text [MediaGroup4]
SDF Text [MediaGroup5]
SDF Text [MediaGroup6]
SDF Text [MediaGroup7]
SDF Text [MediaGroup8]
SDF Text [MediaGroup9]
SDF Number [MediaSize1]
SDF Number [MediaSize2]
SDF Number [MediaSize3]
SDF Number [MediaSize4]
SDF Number [MediaSize5]
SDF Number [MediaSize6]
SDF Number [MediaSize7]
SDF Number [MediaSize8]
SDF Number [MediaSize9]
SDF Text [AutodeskGroup]
SDF Text [MediaRoot]
SDF Text [FullDesc]
SDF Text [FullDesc2]
SDF Text [CustomDesc]
SDF Text [CustomDesc2]
SDF Text [ReplaceDesc]
SDF Text [MediaClipText]
SDF Text [ExtractionOptions]
SDF Text [MBInstText]
SDF Text [OLE2ver]
SDF Text [OLE2NLSver]
SDF Text [OLE2DISPver]
SDF Text [OLE2PROXver]
SDF Text [OLE2CONVver]
SDF Text [COMPOBJver]
SDF Text [STORAGEver]
SDF Text [TYPELIBver]
;; remaining variables are not initialized from external Script Data File
Number [FilterSize] := 0
Logical [Installed] := NoCharacter
Logical [ASYMini] := NoCharacter
Logical [ISGDI9dll] := NoCharacter
Logical [ISGDI9ini] := NoCharacter
Logical [Modified] := NoCharacter
Logical [DoDrivers] := NoCharacter
Logical [ExesInstalled] := NoCharacter
Logical [FiltersInstalled] := NoCharacter
Logical [ScorePlayerInstalled] := NoCharacter
Logical [GetOneFile] := NoCharacter
Logical [InsufficientSystem] := NoCharacter
Logical [CompatNoticeGiven] := NoCharacter
Logical [RuntimeInstalled] := NoCharacter
Logical [DefaultTemplate16] := YesCharacter
Logical [UpdateOLE] := NoCharacter
Logical [MediaInstalled] := NoCharacter
Logical [TemplatesInstalled] := NoCharacter
Logical [ColorsInstalled] := NoCharacter
Logical [FormsInstalled] := NoCharacter
Logical [TourInstalled] := NoCharacter
Logical [ToolsInstalled] := NoCharacter
Directory [MediaDest]
Text [DisplayAdapterSummary]
Text [CPUTypeSummary]
Text [NetworkActive]
Text [MathCoprocessorStatus]
Text [InstDriveSummary]
Text [OSVersionSummary]
Text [WinVersionSummary]
Text [SystemMemorySummary]
Text [ExtMemorySummary]
Text [UserName]
Text [Organization]
Text [CModified]
Text [AModified]
Text [BackgroundColor] := 64 0 128 0 64 64 TopToBottom
Text [ScreenColors] := BlackOnWhite
EndDefineVariables
;; Set up basic screen appearance since there will be a brief delay
;; before the external data is ready to use
SetMouseCursor Wait
Do SetupInstalit
[YesOrNo1] := IsFileInUse cpl20.exe
If [YesOrNo1] = NoCharacter
[YesOrNo1] := IsFileInUse cpl20shw.exe
EndIf
If [YesOrNo1] = YesCharacter
SetMouseCursor Arrow
MessageBox [YesOrNo1] OkCancel Exclamation
Setup has detected a copy of [ProductName] currently running on your system.
Please shut this copy down and click OK to continue installing, or Cancel to quit.
EndMessageBox
If [YesOrNo1] = YesCharacter
Do SimpleExit
EndIf
EndIf
Do BetaSave
Do PrepareSystemReport
Do CheckOLE
SetReplacementInquiry On
If [CommandLine1] = -ReplaceFiles
SetReplacementInquiry Off
EndIf
If [CommandLine2] = -ReplaceFiles
SetReplacementInquiry Off
EndIf
If [CommandLine3] = -ReplaceFiles
SetReplacementInquiry Off
EndIf
If [InquireSysFileLocation] = NoCharacter
If DriveIsPresent [BootDrive] ;; if not, COMSPEC has been changed
NoSysFileConfirmation
EndIf
EndIf
If [AskBeforeFileReplace] = NoCharacter
SetReplacementInquiry Off
EndIf
;; We're ready to go now, so hide the bitmap in the middle of the screen
;; and show the one in the upper left corner.
HideBitMap 2
ShowBitMap 1 @xy(10,10)
UnloadBitmap 2
;; This information gets written to compel.ini. Let's look and see if this
;; information already exists there so we can initialize the edit controls.
[String2] := [WindowsDirectory]\compel.ini
If FileExists [String2]
Else
[String2] := [WindowsDirectory]\cpl20.ini
If FileExists [String2]
Else
[String2] := BlankString
EndIf
EndIf
[String9] := A[String2]
If [String9] <> A
[Array1][1] := User Information
[Array1][2] := Name
[Array1][3] := default
[Array1][4] := [String2]
GetPrivateProfileString Using [Array1]
[String1] := [Array1][5]
If [String1] = default
[UserName] := BlankString
Else
[UserName] := [Array1][5]
EndIf
[Array1][1] := User Information
[Array1][2] := Organization
[Array1][3] := default
[Array1][4] := [String2]
GetPrivateProfileString Using [Array1]
[String1] := [Array1][5]
If [String1] = default
[Organization] := BlankString
Else
[Organization] := [Array1][5]
EndIf
Else
[UserName] := BlankString
[Organization] := BlankString
EndIf
SetMouseCursor Arrow
GetUserInfo UseHeader "Introduce yourself" Instructions "Please personalize your copy of Compel."
Name
;[UserName]
Organization
;[Organization]
EndGetUserInfo
;; This is where the main menu starts. We will return here after we're done
;; with some steps, or if the user changes his mind.
:GoAgain
If [InstallationDirectory] = BlankString
[String1] := SubstringOf [WindowsDirectory] from 1 to 1
[InstallationDirectory] := [String1]:[DefaultInstallationDir]
EndIf
[MediaDest] := [InstallationDirectory]\media
SetMouseCursor Arrow
;; Find out what the user wants to do...
;; ...and then do it.
GetMenuChoice Graphic Instructions "Press a button to choose the type of installation."
Complete Installation - [FullDesc] [FullDesc2]
;express
Custom Installation - [CustomDesc] [CustomDesc2]
;custom
File Replacement - [ReplaceDesc]
;onefile
EndGetMenuChoice
ClearScreen
InCase choice is
=1: QueAllFiles
[ExesInstalled] := YesCharacter
[RuntimeInstalled] := YesCharacter
[FiltersInstalled] := YesCharacter
[DoDrivers] := YesCharacter
[ScorePlayerInstalled] := NoCharacter
[MediaInstalled] := YesCharacter
[TemplatesInstalled] := YesCharacter
[ColorsInstalled] := YesCharacter
[FormsInstalled] := YesCharacter
[ToolsInstalled] := YesCharacter
;; UnQueFileGroup [AutodeskGroup]
=2: Do SelectForCustomSetup
=3: Do GetNewCopyOfFile
=4: Do ExitInstallation
EndInCase
;; If nothing got queued after we did what the user wanted, let's start over.
If QueSize = 0
GoTo Continue
EndIf
;;Popup QueSize
;; Will the user be able to run this program after it is installed?
If [InsufficientSystem] = YesCharacter
MessageBox [YesOrNo1] YesNo Question
Analysis of your system has determined that it is
not compatible with [ProductName]. For a complete
summary, press YesCharacter.
Do you wish to continue anyway?
EndMessageBox
If [YesOrNo1] = NoCharacter
Do ExitInstallation
Else
Do ShowSystemSummary
EndIf
EndIf
:GetDest
;; We'll default to drive of Windows directory, since in general it's safe.
If [InstallationDirectory] = BlankString
[String1] := SubstringOf [WindowsDirectory] from 1 to 1
[InstallationDirectory] := [String1]:[DefaultInstallationDir]
EndIf
;; Let's remember what it was in case the user cancels.
[Dir1] := [InstallationDirectory]
DialogWithBrowse [InstallationDirectory]
Setup will install [CompanyName] [ProductName] into the following directory, which
it will create on your hard disk. To install Compel in a
different dirctory or drive, type the name of the directory
you want, or press Browse.
EndDialogWithBrowse
:InstallItAll
If [InstallationDirectory] = BlankString
[InstallationDirectory] := [Dir1]
UnQueAllFiles
EndIf
Do CheckSpace
If QueSize = 0
GoTo Continue
EndIf
;; Let's see if we have enough space...
[Number1] := FreeSpaceOnDrive InstallationDrive
If QueSize > [Number1]
[String1] := SubstringOf [InstallationDirectory] from 1 to 2
MessageBox [YesOrNo1] YesNo Question
There is insufficient space on drive [String1] for
this installation.
Try another destination?
EndMessageBox
If [YesOrNo1] = YesCharacter
GoTo GetDest
Else
[InstallationDirectory] := c:[DefaultInstallationDir]
UnQueAllFiles
GoTo Continue
EndIf
EndIf
;; Once we get a destination, let's make sure there isn't another copy
;; there. If there is, let's start over by checking the version...
[String2] := [InstallationDirectory]\cpl20.exe
If FileExists [String2]
;; Are they different languages?
[YesOrNo3] := NoCharacter
[String3] := BlankString
[String3] := ProductLanguageOf [String2]
[String9] := A[String3]
If [String9] <> A
If [String3] <> [InstallingLanguage]
[YesOrNo3] := YesCharacter
EndIf
EndIf
;; Is it older or newer?
[String1] := ProductVersionOf [String2]
[String2] := StripFilename [String2]
;; If there is no version stamp, or if the version is less than the
;; installing version, we're installing a newer version. This works
;; provided only older versions of this product have no version stamping.
[YesOrNo1] := NoCharacter
[String9] := A[String1]
If [String9] = A
Else
If [String1] < [InstallingVersion]
[YesOrNo1] := YesCharacter
EndIf
EndIf
;; So if it's older...
If [YesOrNo1] = YesCharacter
If [YesOrNo3] = YesCharacter
[String4] := An older [String3]
Else
[String4] := An older
EndIf
Else
;; ...newer...
If [String1] > [InstallingVersion]
If [YesOrNo3] = YesCharacter
[String4] := A newer [String3]
Else
[String4] := A newer
EndIf
Else
;; ...or the same...
If [YesOrNo3] = YesCharacter
[String4] := A(n) [String3]
Else
[String4] := Another
EndIf
EndIf
EndIf
[String4] := [String4] version of [ProductName] exists on your
[String5] := system in the [String2] directory. Do you want to:
[Number2] := 1003
SetMouseCursor Arrow
DialogResource Duplicate Returns [Number1]
StaticText 1000 Uses [String4]
StaticText 1001 Uses [String5]
RadioButtonGroup 1002 to 1003 Uses [Number2]
EndDialogResource
;; If the user OK'ed...
If [Number1] = 1
If [Number2] = 1002
;; If the user wants to overwrite, install to dir in [String2]
;; and fall through.
[InstallationDirectory] := [String2]
Else
;; Else, they want a new destination
GoTo GetDest
EndIf
Else
;; If they canceled, start over at main menu.
If [Number1] = 1259 ;; IDEXIT defined in instrc.h
UnQueAllFiles
GoTo GoAgain
EndIf
EndIf
EndIf
;; Install whatever got queued
;;If FileExists [InstallationDirectory]\install.log
;; DeleteFiles from [InstallationDirectory] Quietly
;; install.log
;; EndDeleteFiles
;;EndIf
SetLogFileTo [InstallationDirectory]\install.log
Logging On
;;Do BitmapQuedFiles
GetQuedFiles [ExtractionOptions]
If [DoDrivers] = YesCharacter
Do InstallDrivers
EndIf
SetMouseCursor Wait
ClearScreen
;; Some files were selected but not installed if <> 0
If QueSize <> 0
[Installed] := NoCharacter
;; Remove files not installed from queue
UnQueAllFiles
;; Message when unable to get all necessary files
SetMouseCursor Arrow
MessageBox Exclamation
Unable to successfully complete this option.
EndMessageBox
Else
[Installed] := YesCharacter
;; If all we did was get one file, we don't want to write the INI files
;; or make a progman group.
If [GetOneFile] = NoCharacter
TextBox @xy(Center,Center)
Writing to initialization files.
One moment...
EndTextBox
Do WriteAsymIni
Do WriteCompelIni
Do WriteWinIni
ClearScreen
EndIf
EndIf
SetMouseCursor Arrow
If [ExesInstalled] = YesCharacter
;; OLE 2.0 requires file locking. OLE 2.0 applications must set SHARE.EXE locking parameters at setup when installing on
;;a Windows 3.1 system. Windows for Workgroups has dynamic file locking, which does not require parameter setting, so
;;SHARE.EXE should not be installed on a Windows for Workgroups machine.
;; Parameter settings for machines not running MS-DOS 4.01:
;; The following line must appear at the top of the user's AUTOEXEC.BAT:
;; {path to DOS directory}\SHARE.EXE /L:500 /F:5100
;; Parameter settings for machines running MS-DOS 4.01:
;; The following line must appear in the user's CONFIG.SYS:
;; INSTALL={path to DOS directory}\SHARE.EXE [/F:500] [/L:5100]
[CModified] := BlankString
[AModified] := BlankString
If FileExists [BootDrive]:\autoexec.bat
ExamineTextFile [BootDrive]:\autoexec.bat
[String1] := LineWith (,SHARE.EXE,)
ForgetTextFile
EndIf
[String9] := A[String1]
If [String9] = A
If FileExists [BootDrive]:\config.sys
ExamineTextFile [BootDrive]:\config.sys
[String1] := LineWith (,SHARE.EXE,)
ForgetTextFile
EndIf
EndIf
[String9] := A[String1]
If [String9] = A
If FileExists [WindowsDirectory]\system.ini
ExamineTextFile [WindowsDirectory]\system.ini
[String1] := lineWith (device=vshare,,)
ForgetTextFile
EndIf
EndIf
[String9] := A[String1]
If [String9] = A
MessageBox [YesOrNo1] YesNo Question
Asymetrix Compel requires either Windows for Workgroups or SHARE.EXE.
If you are not using Windows for Workgroups, you must run SHARE.EXE.
Would you like Setup to add SHARE.EXE to your AUTOEXEC.BAT?
EndMessageBox
Else
[YesOrNo1] := NoCharacter
EndIf
SetMouseCursor Wait
If [YesOrNo1] = YesCharacter
[CommandLine1] := FullPathTo SHARE.EXE Quietly Search AllFixed
If [CommandLine1] <> BlankString
[CommandLine1] := [CommandLine1] /L:500 /F:5100
If OSVersion = [DOS401]
[CommandLine1] := INSTALL=[CommandLine1]
ModifyConfigSys Quietly
AddOrChangeLineWith (,SHARE.EXE,) as "[CommandLine1]" At Beginning
EndModifyConfigSys
[CModified] := config.sys
Else
ModifyAutoexecBat Quietly
AddOrChangeLineWith (,SHARE.EXE,) as "[CommandLine1]" At Beginning
EndModifyAutoexecBat
[AModified] := autoexec.bat
EndIf
[Modified] := YesCharacter
EndIf
EndIf
SetMouseCursor Arrow
MessageBox [YesOrNo1] YesNo Question
Would you like to add
[InstallationDirectory]
to your path?
EndMessageBox
If [YesOrNo1] = YesCharacter
ModifyAutoexecBat
AddPathComponent [InstallationDirectory] at End ;; or "at Beginning"
EndModifyAutoexecBat
[AModified] := autoexec.bat
[Modified] := YesCharacter
EndIf
If [UpdateOLE] = YesCharacter
SetMouseCursor Wait
Run [WindowsSystemDirectory]\regedit.exe /s ole2.reg
Run [WindowsSystemDirectory]\regedit.exe /s cleanup.reg
SetMouseCursor Arrow
EndIf
EndIf
If ([ExesInstalled] = Y) .OR. ([RuntimeInstalled] = Y) .OR. ([ToolsInstalled] = Y)
MessageBox [YesOrNo1] YesNo Question
Would you like Setup to build
a Program Manager group?
EndMessageBox
If [YesOrNo1] = YesCharacter
Do BuildProgmanGroup
EndIf
EndIf
:Continue
[GetOneFile] := NoCharacter
[ExesInstalled] := NoCharacter
[FiltersInstalled] := NoCharacter
[RuntimeInstalled] := NoCharacter
[MediaInstalled] := NoCharacter
[TemplatesInstalled] := NoCharacter
[ColorsInstalled] := NoCharacter
[FormsInstalled] := NoCharacter
[DoDrivers] := NoCharacter
GoTo GoAgain
;; EndMain
Procedure InstallDrivers
Dialog [YesOrNo1] UseHeader "[DefaultTitle]"
Would you like to install Video for Windows 1.1?
EndDialog
If [YesOrNo1] = YesCharacter
[Dir1] := [InstallationDirectory]
[InstallationDirectory] := [WindowsSystemDirectory]
[Number10] := FreeSpaceOnDrive InstallationDrive
If [WinVideoSize] > [Number10]
[String1] := SubstringOf [InstallationDirectory] from 1 to 2
MessageBox Exclamation
There is insufficient space on drive [String1] to install
these drivers.
You must free approximately [WinVideoSize] bytes on this drive,
and try installing again.
EndMessageBox
[InstallationDirectory] := [Dir1]
Exit
EndIf
[InstallationDirectory] := [Dir1]
If [CDInstall] = YesCharacter
If FileExists [InstallFromDirectory]\winvideo\disk1\vfwsetup.exe
ShowWindow Minimized
Run [InstallFromDirectory]\winvideo\disk1\vfwsetup.exe
ShowWindow Maximized
EndIf
Else
If DriveIsRemoveable [InstallFromDrive]
;; The string here "Compel Disk 8" is the string that MediaBuilder
;; put on the disk, and appears in the PVD by the NewSeries item.
Dialog PressAKey
Please insert the disk labeled "Compel 2.0 Disk 8" in drive [InstallFromDrive]
EndDialog
VerifyCorrectMedia [InstallFromDrive] Compel Disk 8 filename = vfwsetup.exe
If FileExists [InstallFromDrive]:vfwsetup.exe
ShowWindow Minimized
Run [InstallFromDrive]:vfwsetup.exe
ShowWindow Maximized
EndIf
Else
[String1] := [InstallFromDirectory]
:GetDir1
Dialog [String1] 63 UseHeader "[DefaultTitle]" UpperCase
Please enter the location where the
files from Disk 8 can be found.
Leave blank to exit.
EndDialog
[String9] := A[String1]
If [String9] = A
Exit
EndIf
[Number1] := LengthOf [String1]
[String2] := SubstringOf [String1] from [Number1] to End
[String3] := \
If [String2] <> [String3]
[String1] := [String1]\
EndIf
If FileExists [String1]vfwsetup.exe
ShowWindow Minimized
Run [String1]vfwsetup.exe
ShowWindow Maximized
Else
[String2] := StrLower [String1]
MessageBox Exclamation
Could not find Video for Windows setup in
[String2]
EndMessageBox
GoTo GetDir1
EndIf
EndIf
EndIf
EndIf
EndProcedure
Procedure MediaClipInstall
:NewCombo
[Number1] := [MediaSize1]
[Number2] := [MediaSize2]
[Number3] := [MediaSize3]
[Number4] := [MediaSize4]
[Number5] := [MediaSize5]
[Number6] := [MediaSize6]
[Number7] := [MediaSize7]
[Number8] := [MediaSize8]
CheckBoxDialog [MediaDest] UseHeader "Media File Options"
Instructions
;Select a destination directory and the media files you want
;to install. When you are done, press OK to continue, or Cancel
;to return to the main menu. For details about these options,
;see the Compel Guide to Clip Art and Clip Media.
[MediaGroup1]
;[Number1]
[MediaGroup2]
;[Number2]
[MediaGroup3]
;[Number3]
[MediaGroup4]
;[Number4]
[MediaGroup5]
;[Number5]
[MediaGroup6]
;[Number6]
[MediaGroup7]
;[Number7]
[MediaGroup8]
;[Number8]
EndCheckBoxDialog
[Number10] := [Number1] + [Number2] + [Number3] + [Number4] + [Number5]
[Number10] := [Number10] + [Number6] + [Number7] + [Number8]
If [Number10] = 0
Exit
EndIf
[Dir1] := [InstallationDirectory]
[InstallationDirectory] := [MediaDest]
[Number9] := FreeSpaceOnDrive
[InstallationDirectory] := [Dir1]
If [Number10] > [Number9]
[String1] := SubstringOf [MediaDest] from 1 to 2
MessageBox [YesOrNo1] YesNo Question
There is insufficient space on drive [String1] for
this installation.
Try a different destination or combination of files?
EndMessageBox
If [YesOrNo1] = YesCharacter
GoTo NewCombo
Else
GoTo Continue
EndIf
EndIf
If [Number1] > 0
CopyFiles from [InstallFromDrive]:[MediaRoot]\anim to [MediaDest]\anim
*.*
EndCopyFiles
EndIf
If [Number2] > 0
CopyFiles from [InstallFromDrive]:[MediaRoot]\music\16bit to [MediaDest]\music\16bit
*.*
EndCopyFiles
CopyFiles from [InstallFromDrive]:[MediaRoot]\music\8bit to [MediaDest]\music\8bit
*.*
EndCopyFiles
CopyFiles from [InstallFromDrive]:[MediaRoot]\mzcacnt to [MediaDest]\mzcacnt
*.*
EndCopyFiles
EndIf
If [Number3] > 0
CopyFiles from [InstallFromDrive]:[MediaRoot]\music\midi to [MediaDest]\music\midi
*.*
EndCopyFiles
EndIf
If [Number4] > 0
CopyFiles from [InstallFromDrive]:[MediaRoot]\soundfx to [MediaDest]\soundfx
*.*
EndCopyFiles
EndIf
If [Number5] > 0
CopyFiles from [InstallFromDrive]:[MediaRoot]\video\ms_video to [MediaDest]\video\ms_video
*.*
EndCopyFiles
EndIf
If [Number6] > 0
CopyFiles from [InstallFromDrive]:[MediaRoot]\video\indeo to [MediaDest]\video\indeo
*.*
EndCopyFiles
EndIf
If [Number7] > 0
CopyFiles from [InstallFromDrive]:[MediaRoot]\morphs to [MediaDest]\morphs
*.*
EndCopyFiles
EndIf
If [Number8] > 0
CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\present1 to [MediaDest]\scores\present
*.*
EndCopyFiles
CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\intermsn to [MediaDest]\scores\intermsn
*.*
EndCopyFiles
CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\theend1 to [MediaDest]\scores\the_end1
*.*
EndCopyFiles
CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\theend2 to [MediaDest]\scores\the_end2
*.*
EndCopyFiles
CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\btmline to [MediaDest]\scores\btmline
*.*
EndCopyFiles
CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\stats to [MediaDest]\scores\stats
*.*
EndCopyFiles
CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\sailing to [MediaDest]\scores\sailing
*.*
EndCopyFiles
EndIf
EndProcedure
Procedure MBInstall
If FileExists [InstallFromDirectory]\mblitz\setup.exe
ShowWindow Minimized
ChangeDirectoryTo [InstallFromDirectory]\mblitz
Run [InstallFromDirectory]\mblitz\setup.exe
ChangeDirectoryTo [InstallFromDirectory]
ShowWindow Maximized
EndIf
EndProcedure
;; This is the procedure to do the custom installation.
;; The number variables need to be initialized to the queue sizes for each
;; of the groups. Queueing the group and calling the QueSize function is
;; the only way to do this. It's OK, because it doesn't actually take much
;; time. Be aware! You cannot use an [ArrayX] variable here, only the
;; [NumberX] variable works. You cannot get return values in an [ArrayX].
;;
;; So, the dialog box will change the values of the number variables depending
;; on whether or not the checkboxes were checked. Unchecked buttons will
;; get 0 for a value, otherwise the queue size will be in the variables,
;; as when before the box came up. If the user hits cancel, the values will
;; all be 0, as if they had unchecked all the boxes.
;;
;; You can, for now, have up to 10 groups. Not many more will fit on the
;; screen in VGA. If you need more than that, talk to me (Janet Lennon)
;; and I'll see what I can do about it.
Procedure SelectForCustomSetup
:Restart
QueFileGroup [Module1Groups]
QueFiles
flake.avi
EndQueFiles
[Number1] := QueSize
UnQueAllFiles
QueFileGroup [Module2Groups]
[Number2] := QueSize
UnQueAllFiles
QueFileGroup [Module3Groups]
[Number3] := QueSize
UnQueAllFiles
QueFileGroup [Module4Groups]
[Number4] := QueSize
UnQueAllFiles
QueFileGroup [Module5Groups]
[Number5] := QueSize
UnQueAllFiles
QueFileGroup [Module6Groups]
[Number6] := QueSize
UnQueAllFiles
QueFileGroup [Module8Groups]
[Number7] := QueSize
UnQueAllFiles
[Number8] := [WinVideoSize]
UnQueAllFiles
QueFileGroup [Module10Groups]
[Number9] := QueSize
UnQueAllFiles
if [InstallationDirectory] = BlankString
;; We'll default to c:, since in general it's pretty safe.
[InstallationDirectory] := c:[DefaultInstallationDir]
EndIf
;; Let's remember what it was in case the user cancels.
[Dir1] := [InstallationDirectory]
CheckBoxDialog [InstallationDirectory] @xy(Center,Center) UseHeader "Compel Setup Options"
Instructions
;Select a destination directory and the options you want to install.
;When you are done, press OK to continue, or Cancel to return
;to the main menu.
[Module1Name]
;[Number1]
[Module2Name]
;[Number2]
[Module3Name]
;[Number3]
[Module4Name]
;[Number4]
[Module5Name]
;[Number5]
[Module6Name]
;[Number6]
[Module8Name]
;[Number7]
[Module9Name]
;[Number8]
[Module10Name]
;[Number9]
EndCheckBoxDialog
If [Number1] > 0
QueFileGroup [Module1Groups]
QueFiles
flake.avi
EndQueFiles
[ExesInstalled] := YesCharacter
EndIf
If [Number2] > 0
QueFileGroup [Module2Groups]
[RuntimeInstalled] := YesCharacter
EndIf
If [Number3] > 0
QueFileGroup [Module3Groups]
[TemplatesInstalled] := YesCharacter
EndIf
If [Number4] > 0
QueFileGroup [Module4Groups]
[FormsInstalled] := YesCharacter
EndIf
If [Number5] > 0
QueFileGroup [Module5Groups]
[ColorsInstalled] := YesCharacter
EndIf
If [Number6] > 0
QueFileGroup [Module6Groups]
[MediaInstalled] := YesCharacter
EndIf
IF [Number7] > 0
QueFileGroup [Module8Groups]
[FiltersInstalled] := YesCharacter
EndIf
IF [Number9] > 0
QueFileGroup [Module10Groups]
[ToolsInstalled] := YesCharacter
EndIf
If [Number8] > 0
[DoDrivers] := YesCharacter
Else
If QueSize = 0
[InstallationDirectory] := [Dir1]
Exit
EndIf
;; You have unchecked the Drivers option.
;;
;; Asymetrix 3D F/X requires Video for Windows drivers 1.1. If you
;; do not have Video for Windows 1.1 installed, Asymetrix 3D F/X
;; will not work correctly.
;;
;; Are you sure you want to do this?
MessageBox [YesOrNo1] Exclamation YesNo
You have unchecked the Drivers option.
The Video for Windows driver enables you to play the files
included in Compel's clip media collection.
Are you sure you want to do this?
EndMessageBox
If [YesOrNo1] = YesCharacter
[DoDrivers] := NoCharacter
Else
Goto Restart
EndIf
EndIf
If QueSize > 0
GoTo InstallItAll
Else
If [DoDrivers] = YesCharacter
Do InstallDrivers
EndIf
EndIf
EndProcedure
;; This procedure gets a filename from the user, should she want to install
;; just one file. For instance, if the user plays with a sample file, and
;; then wants a new copy, or a DLL gets corrupted, this is a handy feature.
Procedure GetNewCopyOfFile
:StartOver
[String1] := BlankString
Dialog [String1] 12 UseHeader "File Replacement" UpperCase
Enter the name of the file you want
to replace. Do not enter the path name.
Leave blank to exit.
EndDialog
[String9] := A[String1]
If [String9] = A
Exit
EndIf
If [String1] contains \
Popup Please enter just the file name with no path.
GoTo StartOver
EndIf
If FileIsInLibrary [String1]
QueFiles
[String1]
EndQueFiles
Else
Popup Cannot find file [String1].
GoTo StartOver
EndIf
;; Let's find out where Compel was installed.
;; Value gets returned in the fifth spot. We mark the default with said
;; string since we can't put BlankString in the middle of the array.
;; If we got "default" back, Compel has not yet been installed. Otherwise,
;; set the returned value in [InstallationDirectory] and we know the file
;; will go to the right place. Or, at least it will if the user hasn't
;; moved anything.
[Array1][1] := Registered Apps
[Array1][2] := CPL20
[Array1][3] := default
[Array1][4] := [WindowsDirectory]\asym.ini
GetPrivateProfileString Using [Array1]
[String1] := [Array1][5]
If [String1] = default
[InstallationDirectory] := C:[DefaultInstallationDir]
Else
[Number1] := PositionOf "\CPL20.EXE" in [String1]
[Number1] := [Number1] - 1
[InstallationDirectory] := SubstringOf [String1] from 1 to [Number1]
EndIf
DialogWithBrowse [InstallationDirectory]
Please make sure that Setup has the correct directory
for your copy of [ProductName].
EndDialogWithBrowse
If [InstallationDirectory] = BlankString
[InstallationDirectory] := [Dir1]
UnQueAllFiles
EndIf
If QueSize > 0
GetQuedFiles FileThermometerOnly
EndIf
UnQueAllFiles
[GetOneFile] := YesCharacter
[DoDrivers] := NoCharacter
EndProcedure
Procedure WriteCompelIni
;; Let's only change these if the sounds (and exes) were written in fresh.
If ([ExesInstalled] = YesCharacter) .OR. ([RuntimeInstalled] = YesCharacter)
;; [Array1][1] := General
;; [Array1][2] := StartUpSound
;; [Array1][3] := [InstallationDirectory]\startup.wav
;; [Array1][4] := [WindowsDirectory]\cpl20.ini
;; WritePrivateProfileString Using [Array1]
;; [Array1][1] := General
;; [Array1][2] := ShutDownSound
;; [Array1][3] := [InstallationDirectory]\signoff.wav
;; [Array1][4] := [WindowsDirectory]\cpl20.ini
;; WritePrivateProfileString Using [Array1]
[Array1][1] := General
[Array1][2] := SuppressPresentationImport
[Array1][3] := <NULL>
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1] delete
[Array1][1] := Directories
[Array1][2] := Cpl
[Array1][3] := [InstallationDirectory]
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Directories
[Array1][2] := Graphic
[Array1][3] := [InstallationDirectory]\graphic
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
CreateDirectoryIfNecessary [InstallationDirectory]\graphic
[Array1][1] := Directories
[Array1][2] := Chart
[Array1][3] := [InstallationDirectory]\chart
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
CreateDirectoryIfNecessary [InstallationDirectory]\chart
[Array1][1] := Directories
[Array1][2] := Forms
[Array1][3] := [InstallationDirectory]\forms
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
EndIf
If [UserName] <> BlankString
[Array1][1] := User Information
[Array1][2] := Name
[Array1][3] := [UserName]
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
EndIf
If [Organization] <> BlankString
[Array1][1] := User Information
[Array1][2] := Organization
[Array1][3] := [Organization]
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
EndIf
If [MediaInstalled] = YesCharacter
[Array1][1] := Clips
[Array1][2] := default
[Array1][3] := [InstallationDirectory]\media\default.cpf
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Directories
[Array1][2] := Clipart
[Array1][3] := [InstallationDirectory]\clipart
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Directories
[Array1][2] := Media
[Array1][3] := [InstallationDirectory]\media
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
EndIf
If [TemplatesInstalled] = YesCharacter
[Array1][1] := Template
[Array1][2] := Template
[Array1][3] := [InstallationDirectory]\template\default.tpl
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Directories
[Array1][2] := Template
[Array1][3] := [InstallationDirectory]\template
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
EndIf
If [ColorsInstalled] = YesCharacter
[Array1][1] := Directories
[Array1][2] := Color
[Array1][3] := [InstallationDirectory]\color
[Array1][4] := [WindowsDirectory]\cpl20.ini
WritePrivateProfileString Using [Array1]
EndIf
EndProcedure
Procedure WriteAsymIni
If FileExists [WindowsDirectory]\Asym.ini
CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
asym.ini as asym.bak
EndCopyFiles
EndIf
If [ExesInstalled] = YesCharacter
[Array1][1] := Registered Apps
[Array1][2] := CPL20
[Array1][3] := [InstallationDirectory]\CPL20.EXE,2.0,United States
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Spelling
[Array1][2] := UserDictName
[Array1][3] := user.spl
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Spelling
[Array1][2] := LangDictPath
[Array1][3] := [WindowsDirectory]\asym\spellchk
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
EndIf
If [ToolsInstalled] = YesCharacter
[Array1][1] := Registered Apps
[Array1][2] := BITEDIT
[Array1][3] := [WindowsDirectory]\asym\apps\asymbit.exe,1,United States
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Registered Apps
[Array1][2] := PALEDIT
[Array1][3] := [WindowsDirectory]\asym\apps\asympal.exe,1,United States
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Registered Apps
[Array1][2] := WAVEEDIT
[Array1][3] := [WindowsDirectory]\asym\apps\asymwave.exe,1,United States
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
EndIf
If [FiltersInstalled] = YesCharacter
[Array1][1] := Graphic Import Filters
[Array1][2] := CGM (*.cgm)
[Array1][3] := [WindowsDirectory]\asym\filters\imcgm9.flt,cgm
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := Micrografx DRAW! (*.drw)
[Array1][3] := [WindowsDirectory]\asym\filters\imdrw9.flt,drw
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := AutoCAD DXF (*.dxf)
[Array1][3] := [WindowsDirectory]\asym\filters\imdxf9.flt,dxf
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := Adobe Illustrator (*.ai)
[Array1][3] := [WindowsDirectory]\asym\filters\imps_9.flt,ai
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := Postscript (*.eps)
[Array1][3] := [WindowsDirectory]\asym\filters\imps_9.flt,eps
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := CompuServe GIF (*.gif)
[Array1][3] := [WindowsDirectory]\asym\filters\ibgif9.flt,gif
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := JPEG / JFIF (*.JPG)
[Array1][3] := [WindowsDirectory]\asym\filters\ibjpg9.flt,jpg
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := Macintosh PICT (*.pct)
[Array1][3] := [WindowsDirectory]\asym\filters\impct9.flt,pct
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := PC Paintbrush (*.pcx)
[Array1][3] := [WindowsDirectory]\asym\filters\ibpcx9.flt,pcx
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := Lotus Picture (*.pic)
[Array1][3] := [WindowsDirectory]\asym\filters\impic9.flt,pic
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := Tagged Image File (*.tif)
[Array1][3] := [WindowsDirectory]\asym\filters\ibtif9.flt,tif
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := Bitmap (*.bmp)
[Array1][3] := [WindowsDirectory]\asym\filters\ibbmp9.flt,bmp
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := Corel Draw (*.cdr)
[Array1][3] := [WindowsDirectory]\asym\filters\imcdr9.flt,cdr
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
[Array1][1] := Graphic Import Filters
[Array1][2] := DIB (*.dib)
[Array1][3] := [WindowsDirectory]\asym\filters\ibbmp9.flt,dib
[Array1][4] := [WindowsDirectory]\asym.ini
WritePrivateProfileString Using [Array1]
;; [Array1][1] := Graphic Import Filters
;; [Array1][2] := Harvard Graphics 2.3 (*.cht)
;; [Array1][3] := [WindowsDirectory]\asym\filters\imhg29.flt,cht
;; [Array1][4] := [WindowsDirectory]\asym.ini
;; WritePrivateProfileString Using [Array1]
;; [Array1][1] := Graphic Import Filters
;; [Array1][2] := Harvard Graphics 2.3 Symbol (*.sym)
;; [Array1][3] := [WindowsDirectory]\asym\filters\imhg29.flt,sym
;; [Array1][4] := [WindowsDirectory]\asym.ini
;; WritePrivateProfileString Using [Array1]
;; [Array1][1] := Graphic Import Filters
;; [Array1][2] := Harvard Graphics 3 (*.ch3)
;; [Array1][3] := [WindowsDirectory]\asym\filters\imhg39.flt,ch3
;; [Array1][4] := [WindowsDirectory]\asym.ini
;; WritePrivateProfileString Using [Array1]
;; [Array1][1] := Graphic Import Filters
;; [Array1][2] := Harvard Graphics 3 Symbol (*.sy3)
;; [Array1][3] := [WindowsDirectory]\asym\filters\imhg39.flt,sy3
;; [Array1][4] := [WindowsDirectory]\asym.ini
;; WritePrivateProfileString Using [Array1]
EndIf
EndProcedure
Procedure WriteWinIni
;; If we'll be writing cplshow as the exe of choice, let's make sure
;; compel.exe hasn't already been written in. And if it has, we'll
;; make sure the file is still there.
If [ExesInstalled] = YesCharacter
CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
win.ini as win.bak
EndCopyFiles
[Dir1] := [InstallationDirectory]\cpl20.exe
[Array1][1] := Extensions
[Array1][2] := art
[Array1][3] := [Dir1] -a ^.art
WriteProfileString Using [Array1]
[Array1][1] := Extensions
[Array1][2] := pkg
[Array1][3] := [InstallationDirectory]\cpl20upk.exe ^.pkg
WriteProfileString Using [Array1]
[Array1][1] := Extensions
[Array1][2] := cpl
[Array1][3] := [Dir1] ^.cpl
WriteProfileString Using [Array1]
Else
If [RuntimeInstalled] = YesCharacter
[Array1][1] := Extensions
[Array1][2] := cpl
[Array1][3] := default
GetProfileString Using [Array1]
[String1] := [Array1][4]
If [String1] = default
[Dir1] := [InstallationDirectory]\cpl20shw.exe
Else
[Number1] := PositionOf "^.cpl" in [String1]
[Number1] := [Number1] - 2
[String2] := SubstringOf [String1] from 1 to [Number1]
If FileExists [String2]
Exit
Else
[Dir1] := [InstallationDirectory]\cpl20shw.exe
EndIf
EndIf
[Array1][1] := Extensions
[Array1][2] := cpl
[Array1][3] := [Dir1] ^.cpl
WriteProfileString Using [Array1]
EndIf
EndIf
EndProcedure
Procedure WriteDriverInfo
;; AutoDesk driver strings
[Array1][1] := mci extensions
[Array1][2] := fli
[Array1][3] := Autodesk
WriteProfileString Using [Array1]
[Array1][1] := mci extensions
[Array1][2] := flc
[Array1][3] := Autodesk
WriteProfileString Using [Array1]
[Array1][1] := mci
[Array1][2] := Autodesk
[Array1][3] := mciaap.drv
[Array1][4] := [WindowsDirectory]\system.ini
WritePrivateProfileString Using [Array1]
EndProcedure
Procedure BuildProgmanGroup
[String1] := ShadowDirectory
ProgramManagerDDE
CreateGroup("Asymetrix Compel 2.0", "cpl20.grp")
ShowGroup("Asymetrix Compel 2.0")
EndProgramManagerDDE
If [ExesInstalled] = YesCharacter
ProgramManagerDDE
ReplaceItem("Asymetrix Compel")
AddItem([InstallationDirectory]\cpl20.exe,"Asymetrix Compel",[InstallationDirectory]\cpl20.exe,0,-1,-1,[InstallationDirectory])
ReplaceItem("Asymetrix Compel Unpackage")
AddItem([InstallationDirectory]\cpl20upk.exe,"Asymetrix Compel Unpackage",[InstallationDirectory]\cpl20upk.exe,0,-1,-1,[InstallationDirectory])
ReplaceItem("Asymetrix Compel Help")
AddItem([InstallationDirectory]\cpl20.hlp,"Asymetrix Compel Help",[WindowsDirectory]\winhelp.exe,0,-1,-1,[InstallationDirectory])
EndProgramManagerDDE
EndIf
If [RuntimeInstalled] = YesCharacter
ProgramManagerDDE
ReplaceItem("Asymetrix Compel Show")
AddItem([InstallationDirectory]\cpl20shw.exe,"Asymetrix Compel Show",[InstallationDirectory]\cpl20shw.exe,4,-1,-1,[InstallationDirectory])
EndProgramManagerDDE
EndIf
If ([ExesInstalled] = YesCharacter) .OR. ([RuntimeInstalled] = YesCharacter)
ProgramManagerDDE
ReplaceItem("Remove Asymetrix Compel")
AddItem([InstallationDirectory]\uninstal.exe,"Remove Asymetrix Compel",[InstallationDirectory]\uninstal.exe,0,-1,-1,[String1])
EndProgramManagerDDE
EndIf
If [ToolsInstalled] = YesCharacter
ProgramManagerDDE
ReplaceItem("Bit Edit")
AddItem([WindowsDirectory]\asym\apps\asymbit.exe, "Bit Edit", [WindowsDirectory]\asym\apps\asymbit.exe, 0, -1, -1, [InstallationDirectory])
ReplaceItem("Pal Edit")
AddItem([WindowsDirectory]\asym\apps\asympal.exe, "Pal Edit", [WindowsDirectory]\asym\apps\asympal.exe, 0, -1, -1, [InstallationDirectory])
ReplaceItem("Wave Edit")
AddItem([WindowsDirectory]\asym\apps\asymwave.exe, "Wave Edit", [WindowsDirectory]\asym\apps\asymwave.exe, 0, -1, -1, [InstallationDirectory])
EndProgramManagerDDE
EndIf
EndProcedure
Procedure CleanWinIni
[Array1][1] := Extensions
[Array1][2] := cpl
[Array1][3] := <NULL>
WriteProfileString Using [Array1] delete
[Array1][1] := Extensions
[Array1][2] := art
[Array1][3] := <NULL>
WriteProfileString Using [Array1] delete
[Array1][1] := Extensions
[Array1][2] := pkg
[Array1][3] := <NULL>
WriteProfileString Using [Array1] delete
EndProcedure
;; Here we read a lot of stuff out of the data file. This sets up strings
;; for installation and some boolean variables so we can test the system.
Procedure SetupInstalit
SetBackupModeTo BAK
SetCoordinatesTo pixel
SetScreenAttrTo [ScreenColors]
LoadBitMap 1 [InstallFromDirectory]\SETUP.BMP
LoadBitMap 2 [InstallFromDirectory]\COPYCMPL.BMP
ShowBitMap 2
;; These are a matter of taste. Creative services should decide about
;; these, I think.
SetBackgroundColor [BackgroundColor]
;; SetDithering Off
ShowWindow Maximized
ClearScreen
If FileExists [InstallFromDirectory]\[SDFFileName]
;; LoadBitMap 3 [InstallFromDirectory]\one.bmp
;; LoadBitMap 4 [InstallFromDirectory]\two.bmp
;; LoadBitMap 5 [InstallFromDirectory]\three.bmp
;; LoadBitMap 6 [InstallFromDirectory]\four.bmp
;; LoadBitMap 7 [InstallFromDirectory]\five.bmp
;; LoadBitMap 8 [InstallFromDirectory]\six.bmp
;; LoadBitMap 9 [InstallFromDirectory]\seven.bmp
;; LoadBitMap 10 [InstallFromDirectory]\eight.bmp
If MaxX = 640
[Number1] := 85
EndIf
If MaxX = 1024
[Number1] := 240
EndIf
If MaxX = 800
[Number1] := 150
EndIf
TextBox @xy(Center,[Number1])
Getting custom information...one moment, please.
EndTextBox
ExamineTextFile [InstallFromDirectory]\[SDFFileName]
[InquireSysFileLocation] := SettingFor InquireSysFileLocation
If [InquireSysFileLocation] = NoCharacter
NoSysFileConfirmation
EndIf
;; These need to be done early.
[ProductName] := SettingFor ProductName
[DefaultTitle] := SettingFor DefaultTitle
[PopupBorder] := SettingFor PopupBorder
[ModifyMode] := SettingFor ModifyMode
SetPopupBorderTo [PopupBorder]
SetModifyModeTo [ModifyMode]
SetShadowAttrTo DarkGrayOnBlack
[CDInstall] := SettingFor CDInstall
[CompanyName] := SettingFor CompanyName
[Module1Name] := SettingFor Module1Name
[Module1Groups] := SettingFor Module1Groups
[Module2Name] := SettingFor Module2Name
[Module2Groups] := SettingFor Module2Groups
[Module2aGroups] := SettingFor Module2aGroups
[Module3Name] := SettingFor Module3Name
[Module3Groups] := SettingFor Module3Groups
[Module4Name] := SettingFor Module4Name
[Module4Groups] := SettingFor Module4Groups
[Module5Name] := SettingFor Module5Name
[Module5Groups] := SettingFor Module5Groups
[Module6Name] := SettingFor Module6Name
[Module6Groups] := SettingFor Module6Groups
[Module7Name] := SettingFor Module7Name
[Module7Groups] := SettingFor Module7Groups
[Module8Name] := SettingFor Module8Name
[Module8Groups] := SettingFor Module8Groups
[Module9Name] := SettingFor Module9Name
[Module9Groups] := SettingFor Module9Groups
[Module10Name] := SettingFor Module10Name
[Module10Groups] := SettingFor Module10Groups
[MediaGroup1] := SettingFor MediaGroup1
[MediaGroup2] := SettingFor MediaGroup2
[MediaGroup3] := SettingFor MediaGroup3
[MediaGroup4] := SettingFor MediaGroup4
[MediaGroup5] := SettingFor MediaGroup5
[MediaGroup6] := SettingFor MediaGroup6
[MediaGroup7] := SettingFor MediaGroup7
[MediaGroup8] := SettingFor MediaGroup8
[MediaGroup9] := SettingFor MediaGroup9
[MediaSize1] := SettingFor MediaSize1
[MediaSize2] := SettingFor MediaSize2
[MediaSize3] := SettingFor MediaSize3
[MediaSize4] := SettingFor MediaSize4
[MediaSize5] := SettingFor MediaSize5
[MediaSize6] := SettingFor MediaSize6
[MediaSize7] := SettingFor MediaSize7
[MediaSize8] := SettingFor MediaSize8
[MediaSize9] := SettingFor MediaSize9
[AutodeskGroup] := SettingFor AutodeskGroup
[InstallingVersion] := SettingFor InstallingVersion
[InstallingLanguage] := SettingFor InstallingLanguage
[FullDesc] := SettingFor FullDesc
[FullDesc2] := SettingFor FullDesc2
[CustomDesc] := SettingFor CustomDesc
[CustomDesc2] := SettingFor CustomDesc2
[ReplaceDesc] := SettingFor ReplaceDesc
[MediaRoot] := SettingFor MediaRoot
[MediaClipText] := SettingFor MediaClipText
[MBInstText] := SettingFor MBInstText
[ExtractionOptions] := SettingFor ExtractionOptions
[ReadmeFileName] := SettingFor ReadmeFileName
[AskBeforeFileReplace] := SettingFor AskBeforeFileReplace
[MinimumOSVersion] := SettingFor MinimumOSVersion
[DOS401] := SettingFor DOS401
[MinimumWinVersion] := SettingFor MinimumWinVersion
[WinVideoSize] := SettingFor WinVideoSize
[OLESize] := SettingFor OLESize
[AllowCGA] := SettingFor AllowCGA
[AllowEGA] := SettingFor AllowEGA
[AllowMDA] := SettingFor AllowMDA
[Allow808x] := SettingFor Allow808X
[Allow80286] := SettingFor Allow80286
[MathCoproRecommended] := SettingFor MathCoproRecommended
[FixedDiskRequired] := SettingFor FixedDiskRequired
[NetworkInstallation] := SettingFor NetworkInstallation
[MinMemRequiredPresent] := SettingFor MinMemRequiredPresent
[MinExtMemoryRequired] := SettingFor MinExtMemoryRequired
[DefaultInstallationDir] := SettingFor DefaultInstallationDir
[OLE2ver] := SettingFor OLE2ver
[OLE2NLSver] := SettingFor OLE2NLSver
[OLE2DISPver] := SettingFor OLE2DISPver
[OLE2PROXver] := SettingFor OLE2PROXver
[OLE2CONVver] := SettingFor OLE2CONVver
[COMPOBJver] := SettingFor COMPOBJver
[STORAGEver] := SettingFor STORAGEver
[TYPELIBver] := SettingFor TYPELIBver
ClearScreen ;; get rid of textbox
ForgetTextFile
UnqueAllFiles
QueFileGroup [Module8Groups]
[FilterSize] := QueSize
UnqueAllFiles
Else
Popup Script Data File [SDFFileName] is missing. Cannot continue.
UnloadBitmap 1
SoLong Quietly
EndIf
EndProcedure
;; Here we do cleanup. If we installed anything, we modify config.sys and
;; autoexec.bat if necessary. We offer to run our product and offer to
;; browse the readme.txt.
Procedure ExitInstallation
ClearScreen
If [Installed] = YesCharacter
[YesOrNo1] := NoCharacter
[String1] := Setup made a backup of your:
[String2] := BlankString
[String3] := BlankString
[String4] := BlankString
If [ASYMini] = YesCharacter
[String2] := " ASYM.INI file named ASYMINI.OLD"
[YesOrNo1] := YesCharacter
EndIf
If [ISGDI9dll] = YesCharacter
[String3] := " ISGDI9.DLL file named ISGDI9DL.OLD"
[YesOrNo1] := YesCharacter
EndIf
If [ISGDI9ini] = YesCharacter
[String4] := " ISGDI9.INI file named ISGDI9IN.OLD"
[YesOrNo1] := YesCharacter
EndIf
If [YesOrNo1] = YesCharacter
Dialog UseHeader "[DefaultTitle]"
[String1]
[String2]
[String3]
[String4]
EndDialog
EndIf
If [Modified] = YesCharacter
[String9] := A[AModified]
If [String9] = A
[String1] := [CModified]
Else
[String9] := A[CModified]
If [String9] <> A
[String1] := [AModified] and [CModified]
Else
[String1] := [AModified]
EndIf
EndIf
MessageBox Information
Installation is complete.
Setup modified [String1].
You must reboot your computer before using Compel.
EndMessageBox
Else
MessageBox Information ;; Final Farewell
Installation is complete.
You must restart Windows before
using Compel.
EndMessageBox
EndIf
;; If [ReadmeFileName] <> BlankString
;; MessageBox [YesOrNo1] YesNo Question ;; Ask whether to browse readme file, if any
;; [ReadmeFileName] contains important information.
;; Do you wish to read it now?
;; EndMessageBox
;; If [YesOrNo1] = YesCharacter
;; If FileExists [InstallationDirectory]\readme.wri
;; Run [WindowsDirectory]\write.exe [InstallationDirectory]\readme.wri NoWait
;; EndIf
;; EndIf
;; EndIf
EndIf
Do SimpleExit
EndProcedure
;; System summary - change with care.
Procedure ShowSystemSummary
Dialog PressAKey
HERE IS A SUMMARY OF YOUR SYSTEM
[String8] ;; notes whether any incompatibilities were found
Operating System Version: [OSVersionSummary]
Windows Version: [WinVersionSummary]
CPU Type: [CPUTypeSummary]
Display Adapter: [DisplayAdapterSummary]
Math Coprocessor: [MathCoprocessorStatus]
Main Memory Present: [SystemMemorySummary]
Extended Memory Present: [ExtMemorySummary]
Installation Drive: [InstDriveSummary]
Network: [NetworkActive]
[String9] ;; information about network suitability
EndDialog
EndProcedure
Procedure PrepareSystemReport
[InsufficientSystem] := NoCharacter
If OSVersion < [MinimumOSVersion]
[OSVersionSummary] := OSVersion (need at least [MinimumOSVersion])
[InsufficientSystem] := YesCharacter
Else
[OSVersionSummary] := OSVersion
EndIf
If WindowsVersion < [MinimumWinVersion]
[WinVersionSummary] := WindowsVersion (need at least [MinimumWinVersion])
[InsufficientSystem] := YesCharacter
Else
[WinVersionSummary] := WindowsVersion
EndIf
If ExtendedMemoryPresent < [MinExtMemoryRequired]
[ExtMemorySummary] := ExtendedMemoryPresentK (need at least [MinExtMemoryRequired]K)
[InsufficientSystem] := YesCharacter
Else
[ExtMemorySummary] := ExtendedMemoryPresentK
EndIf
If MainMemoryPresent < [MinMemRequiredPresent]
[SystemMemorySummary] := MainMemoryK (need at least [MinMemRequiredPresent]K)
[InsufficientSystem] := YesCharacter
Else
[SystemMemorySummary] := MainMemoryK
EndIf
If 808X
If [Allow808X] = YesCharacter
[CPUTypeSummary] := 808x
Else
[CPUTypeSummary] := 808x (not compatible with [ProductName])
[InsufficientSystem] := YesCharacter
EndIf
EndIf
If 80286
If [Allow80286] = YesCharacter
[CPUTypeSummary] := 80286
Else
[CPUTypeSummary] := 80286 (not compatible with [ProductName])
[InsufficientSystem] := YesCharacter
EndIf
EndIf
If 80386
[CPUTypeSummary] := 80386
EndIf
If 80486
[CPUTypeSummary] := 80486
EndIf
If [CPUTypeSummary] = BlankString
[CPUTypeSummary] := 808x
EndIf
If MicroChannel
[CPUTypeSummary] := [CPUTypeSummary] (in MicroChannel Architecture)
Else
[CPUTypeSummary] := [CPUTypeSummary] (ISA or EISA Architecture)
EndIf
If CGA
If [AllowCGA] = YesCharacter
[DisplayAdapterSummary] := CGA
Else
[DisplayAdapterSummary] := CGA (not compatible with [ProductName])
[InsufficientSystem] := YesCharacter
EndIf
EndIf
If EGA
If [AllowEGA] = YesCharacter
[DisplayAdapterSummary] := EGA
Else
[DisplayAdapterSummary] := EGA (not compatible with [ProductName])
[InsufficientSystem] := YesCharacter
EndIf
EndIf
If MDA
If [AllowMDA] = YesCharacter
[DisplayAdapterSummary] := MDA
Else
[DisplayAdapterSummary] := MDA (not compatible with [ProductName])
[InsufficientSystem] := YesCharacter
EndIf
EndIf
If VGA
[DisplayAdapterSummary] := VGA
EndIf
If HGC
[DisplayAdapterSummary] := HGC
EndIf
If HGCPlus
[DisplayAdapterSummary] := HGC Plus
EndIf
If Network
[NetworkActive] := Network Active
Else
[NetworkActive] := No Network Active
EndIf
If NovellLoaded
[NetworkActive] := Novell [NetworkActive]
EndIf
If [InstallationDirectory] <> BlankString
[InstDriveSummary] := InstallationDrive (FreeSpaceOnDrive InstallationDrive bytes free)
Else
[InstDriveSummary] := (Not Selected)
EndIf
If MathCoprocessorPresent
[MathCoprocessorStatus] := Present
Else
If [MathCoproRecommended] = YesCharacter
[MathCoprocessorStatus] := Not Present But Recommended
If [CompatNoticeGiven] = YesCharacter
Else
Dialog UseHeader "[DefaultTitle]" ;; Notice if math coprocessor recommended
[ProductName] needs a math coprocessor
for best performance. Your system does not
contain one.
EndDialog
EndIf
Else
[MathCoprocessorStatus] := Not Present
EndIf
EndIf
If [InsufficientSystem] = YesCharacter
[String8] := (Please note the listed incompatibilities)
EndIf
If [NetworkInstallation] contains DisallowNetwork
[String9] := " (You cannot install this version on a network drive)"
EndIf
[CompatNoticeGiven] := YesCharacter
EndProcedure
Procedure BetaSave
If FileExists [WindowsDirectory]\asym.ini
If FileExists [WindowsDirectory]\asymini.old
Else
CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
asym.ini as asymini.old
EndCopyFiles
[ASYMini] := YesCharacter
EndIf
EndIf
If FileExists [WindowsDirectory]\isgdi9.ini
If FileExists [WindowsDirectory]\isgdi9in.old
Else
CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
isgdi9.ini as isgdi9in.old
EndCopyFiles
[ISGDI9ini] := YesCharacter
EndIf
EndIf
If FileExists [WindowsDirectory]\isgdi9.dll
If FileExists [WindowsDirectory]\isgdi9dl.old
Else
CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
isgdi9.dll as isgdi9dl.old
EndCopyFiles
[ISGDI9dll] := YesCharacter
EndIf
EndIf
EndProcedure
Procedure CheckOLE
:CheckOLEAgain
[YesOrNo1] := NoCharacter
[String2] := BlankString
[YesOrNo1] := IsFileInUse OLE2.DLL
If [YesOrNo1] = YesCharacter
[String2] := OLE2.DLL
EndIf
[String1] := FileVersionOf [WindowsSystemDirectory]\OLE2.DLL
If [String1] <= [OLE2ver]
[UpdateOLE] := YesCharacter
EndIf
[YesOrNo2] := IsFileInUse OLE2NLS.DLL
If [YesOrNo2] = YesCharacter
[String2] := [String2], OLE2NLS.DLL
[YesOrNo1] := [YesOrNo2]
EndIf
[String1] := FileVersionOf [WindowsSystemDirectory]\OLE2NLS.DLL
If [String1] <= [OLE2NLSver]
[UpdateOLE] := YesCharacter
EndIf
[YesOrNo2] := IsFileInUse OLE2DISP.DLL
If [YesOrNo2] = YesCharacter
[String2] := [String2], OLE2DISP.DLL
[YesOrNo1] := [YesOrNo2]
EndIf
[String1] := FileVersionOf [WindowsSystemDirectory]\OLE2DISP.DLL
If [String1] <= [OLE2DISPver]
[UpdateOLE] := YesCharacter
EndIf
[YesOrNo2] := IsFileInUse OLE2PROX.DLL
If [YesOrNo2] = YesCharacter
[String2] := [String2], OLE2PROX.DLL
[YesOrNo1] := [YesOrNo2]
EndIf
[String1] := FileVersionOf [WindowsSystemDirectory]\OLE2PROX.DLL
If [String1] <= [OLE2PROXver]
[UpdateOLE] := YesCharacter
EndIf
[YesOrNo2] := IsFileInUse OLE2CONV.DLL
If [YesOrNo2] = YesCharacter
[String2] := [String2], OLE2CONV.DLL
[YesOrNo1] := [YesOrNo2]
EndIf
[String1] := FileVersionOf [WindowsSystemDirectory]\OLE2CONV.DLL
If [String1] <= [OLE2CONVver]
[UpdateOLE] := YesCharacter
EndIf
[YesOrNo2] := IsFileInUse COMPOBJ.DLL
If [YesOrNo2] = YesCharacter
[String2] := [String2], COMPOBJ.DLL
[YesOrNo1] := [YesOrNo2]
EndIf
[String1] := FileVersionOf [WindowsSystemDirectory]\COMPOBJ.DLL
If [String1] <= [COMPOBJver]
[UpdateOLE] := YesCharacter
EndIf
[YesOrNo2] := IsFileInUse STORAGE.DLL
If [YesOrNo2] = YesCharacter
[String2] := [String2], STORAGE.DLL
[YesOrNo1] := [YesOrNo2]
EndIf
[String1] := FileVersionOf [WindowsSystemDirectory]\STORAGE.DLL
If [String1] <= [STORAGEver]
[UpdateOLE] := YesCharacter
EndIf
[YesOrNo2] := IsFileInUse TYPELIB.DLL
If [YesOrNo2] = YesCharacter
[String2] := [String2], TYPELIB.DLL
[YesOrNo1] := [YesOrNo2]
EndIf
[String1] := FileVersionOf [WindowsSystemDirectory]\TYPELIB.DLL
If [String1] <= [TYPELIBver]
[UpdateOLE] := YesCharacter
EndIf
[YesOrNo2] := IsFileInUse STDOLE.TLB
If [YesOrNo2] = YesCharacter
[String2] := [String2], STDOLE.TLB
[YesOrNo1] := [YesOrNo2]
EndIf
[String9] := A[String2]
If [String9] <> A
[Number1] := PositionOf "," in [String2]
If [Number1] = 1
[String2] := SubstringOf [String2] from 3 to End
EndIf
EndIf
If [YesOrNo1] = YesCharacter
SetMouseCursor Arrow
MessageBox [YesOrNo2] OkCancel Exclamation
Setup has detected support files in use that it must replace:
[String2]
Please close applications that may be using these files, such
as Microsoft Office Manager, and click OK to continue installing, or click Cancel to quit.
EndMessageBox
If [YesOrNo2] = NoCharacter
UnQueAllFiles
Do SimpleExit
EndIf
Goto CheckOLEAgain
EndIf
EndProcedure
Procedure CheckSpace
[String1] := SubStringOf [InstallationDirectory] from 1 to 1
[String2] := SubstringOf [WindowsDirectory] from 1 to 1
[Number1] := FreeSpaceOnDrive [String1]
[Number2] := FreeSpaceOnDrive [String2]
[Number3] := QueSize
[Number4] := 0
If [String1] = [String2]
If [DoDrivers] = YesCharacter
[Number3] := [Number3] + [WinVideoSize]
If [ExesInstalled] = YesCharacter
[Number3] := [Number3] - [OLESize]
EndIf
EndIf
Else
If [DoDrivers] = YesCharacter
[Number4] := [WinVideoSize]
EndIf
If [ExesInstalled] = YesCharacter
[Number3] := [Number3] - [OLESize]
If [DoDrivers] = NoCharacter
[Number4] := [Number4] + [OLESize]
EndIf
EndIf
If [FiltersInstalled] = YesCharacter
[Number3] := [Number3] - [FilterSize]
[Number4] := [Number4] + [FilterSize]
EndIf
;; If [ToolsInstalled] = YesCharacter
;; [Number3] := [Number3] - [ToolsSize]
;; [Number4] := [Number4] + [ToolsSize]
;; EndIf
EndIf
If [Number3] > [Number1]
MessageBox Exclamation
There is insufficient space on drive [String1] for
this installation. You must have [Number3] bytes
free on this drive.
EndMessageBox
[InstallationDirectory] := C:[DefaultInstallationDir]
UnQueAllFiles
EndIf
If [Number4 > [Number2]
MessageBox Exclamation
There is insufficient space on drive [String2] for
support file installation. You must have [Number4]
bytes free on this drive.
EndMessageBox
UnQueAllFiles
EndIf
EndProcedure
Procedure BitmapQuedFiles
[Number1] := MaxY - 180
UnQueAllFiles
HideBitmap 1
If [ExesInstalled] = YesCharacter
ShowBitmap 3
QueFileGroup [Module1Groups]
GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
HideBitmap 3
EndIf
If QueSize <> 0
Goto BugOut
EndIf
If [RuntimeInstalled] = YesCharacter
ShowBitmap 4
If [ExesInstalled] = YesCharacter
QueFileGroup [Module2aGroups]
Else
QueFileGroup [Module2Groups]
EndIf
GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
HideBitmap 4
EndIf
If QueSize <> 0
Goto BugOut
EndIf
If [TemplatesInstalled] = YesCharacter
ShowBitmap 5
QueFileGroup [Module3Groups]
GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
HideBitmap 5
EndIf
If QueSize <> 0
Goto BugOut
EndIf
If [FormsInstalled] = YesCharacter
ShowBitmap 6
QueFileGroup [Module4Groups]
GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
HideBitmap 6
EndIf
If QueSize <> 0
Goto BugOut
EndIf
If [ColorsInstalled] = YesCharacter
ShowBitmap 7
QueFileGroup [Module5Groups]
GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
HideBitmap 7
EndIf
If QueSize <> 0
Goto BugOut
EndIf
If [MediaInstalled] = YesCharacter
ShowBitmap 8
QueFileGroup [Module6Groups]
GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
HideBitmap 8
EndIf
If QueSize <> 0
Goto BugOut
EndIf
If [TourInstalled] = YesCharacter
ShowBitmap 9
QueFileGroup [Module7Groups]
GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
HideBitmap 9
EndIf
If QueSize <> 0
Goto BugOut
EndIf
If [FiltersInstalled] = YesCharacter
ShowBitmap 10
QueFileGroup [Module8Groups]
GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
HideBitmap 10
EndIf
:BugOut
ShowBitmap 1
EndProcedure
Procedure SimpleExit
UnloadBitmap 1
;; UnloadBitmap 3
;; UnloadBitmap 4
;; UnloadBitmap 5
;; UnloadBitmap 6
;; UnloadBitmap 7
;; UnloadBitmap 8
;; UnloadBitmap 9
;; UnloadBitmap 10
SoLong Quitely
EndProcedure
;;This procedure eats any nonfatal dde messages. This will stop any
;;bogus errors coming back while installing a group or icon in ProgMan.
Procedure DDEnonFatalErrorTrap
EndProcedure